#ifndef __BACKGROUND_LAYER_H__
#define __BACKGROUND_LAYER_H__

#include "cocos2d.h"

class BackGroundLayer : public cocos2d::Layer
{
public:
	virtual bool init();
	CREATE_FUNC(BackGroundLayer);
	bool checkAndReload(float eyeX);
	void update(float dt);
	void loadObjects( cocos2d::TMXTiledMap* map, int _mapIndex );
	void removeObjects(int _mapIndex);

private:
	cocos2d::TMXTiledMap* map00;
	cocos2d::TMXTiledMap* map01;

	int mapWidth;
	int mapIndex;

	cocos2d::Vector<cocos2d::Node*> objects;
};

#endif // __BACKGROUND_LAYER_H__